using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for HOADONXUATKHOCHITIET.
     /// </summary>
     public class HOADONXUATKHOCHITIET
    {
              private string _MACHITIETHOADON;
      private string _MAHOADON;
      private Guid _MAKHO;
      private Int32 _MAMATHANG;
      private decimal _SOLUONGSI;
      private decimal _SOLUONGLE;
      private decimal _DONGIASI;
      private double _CHIETKHAUTHEOPHANTRAM;
      private decimal _CHIETKHAUTHEOTIEN;
      private bool _ISCKPHANTRAM;
      private decimal _THANHTIENTRUOCCHIETKHAU_CT;
      private decimal _THANHTIENSAUCHIETKHAU_CT;
      private string _GHICHU;
      private bool _ISDELETE;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMACHITIETHOADONNullable
      { get { return false;  } }
      public string MACHITIETHOADON
      {
         get { return _MACHITIETHOADON; }
         set { _MACHITIETHOADON = value; }
      }
      public bool IsMAHOADONNullable
      { get { return true;  } }
      public string MAHOADON
      {
         get { return _MAHOADON;  }
         set { _MAHOADON = value; }
      }
      public bool IsMAKHONullable
      { get { return true;  } }
      public Guid MAKHO
      {
         get { return _MAKHO;  }
         set { _MAKHO = value; }
      }
      public bool IsMAMATHANGNullable
      { get { return true;  } }
      public Int32 MAMATHANG
      {
         get { return _MAMATHANG;  }
         set { _MAMATHANG = value; }
      }
      public bool IsSOLUONGSINullable
      { get { return true;  } }
      public decimal SOLUONGSI
      {
         get { return _SOLUONGSI;  }
         set { _SOLUONGSI = value; }
      }
      public bool IsSOLUONGLENullable
      { get { return true;  } }
      public decimal SOLUONGLE
      {
         get { return _SOLUONGLE;  }
         set { _SOLUONGLE = value; }
      }
      public bool IsDONGIASINullable
      { get { return true;  } }
      public decimal DONGIASI
      {
         get { return _DONGIASI;  }
         set { _DONGIASI = value; }
      }
      public bool IsCHIETKHAUTHEOPHANTRAMNullable
      { get { return true;  } }
      public double CHIETKHAUTHEOPHANTRAM
      {
         get { return _CHIETKHAUTHEOPHANTRAM;  }
         set { _CHIETKHAUTHEOPHANTRAM = value; }
      }
      public bool IsCHIETKHAUTHEOTIENNullable
      { get { return true;  } }
      public decimal CHIETKHAUTHEOTIEN
      {
         get { return _CHIETKHAUTHEOTIEN;  }
         set { _CHIETKHAUTHEOTIEN = value; }
      }
      public bool IsISCKPHANTRAMNullable
      { get { return true;  } }
      public bool ISCKPHANTRAM
      {
         get { return _ISCKPHANTRAM;  }
         set { _ISCKPHANTRAM = value; }
      }
      public bool IsTHANHTIENTRUOCCHIETKHAU_CTNullable
      { get { return true;  } }
      public decimal THANHTIENTRUOCCHIETKHAU_CT
      {
         get { return _THANHTIENTRUOCCHIETKHAU_CT;  }
         set { _THANHTIENTRUOCCHIETKHAU_CT = value; }
      }
      public bool IsTHANHTIENSAUCHIETKHAU_CTNullable
      { get { return true;  } }
      public decimal THANHTIENSAUCHIETKHAU_CT
      {
         get { return _THANHTIENSAUCHIETKHAU_CT;  }
         set { _THANHTIENSAUCHIETKHAU_CT = value; }
      }
      public bool IsGHICHUNullable
      { get { return true;  } }
      public string GHICHU
      {
         get { return _GHICHU;  }
         set { _GHICHU = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }

        #endregion

        #region Constructors
        public HOADONXUATKHOCHITIET()
        {
            Reset();
        }
        public HOADONXUATKHOCHITIET(HOADONXUATKHOCHITIET obj)
        {
            	this._MACHITIETHOADON = obj.MACHITIETHOADON;
	this._MAHOADON = obj.MAHOADON;
	this._MAKHO = obj.MAKHO;
	this._MAMATHANG = obj.MAMATHANG;
	this._SOLUONGSI = obj.SOLUONGSI;
	this._SOLUONGLE = obj.SOLUONGLE;
	this._DONGIASI = obj.DONGIASI;
	this._CHIETKHAUTHEOPHANTRAM = obj.CHIETKHAUTHEOPHANTRAM;
	this._CHIETKHAUTHEOTIEN = obj.CHIETKHAUTHEOTIEN;
	this._ISCKPHANTRAM = obj.ISCKPHANTRAM;
	this._THANHTIENTRUOCCHIETKHAU_CT = obj.THANHTIENTRUOCCHIETKHAU_CT;
	this._THANHTIENSAUCHIETKHAU_CT = obj.THANHTIENSAUCHIETKHAU_CT;
	this._GHICHU = obj.GHICHU;
	this._ISDELETE = obj.ISDELETE;
        }
        #endregion

        public void Reset()
        {
                     _MACHITIETHOADON = EmptyValues.v_string;
         _MAHOADON = EmptyValues.v_string;
         _MAKHO = EmptyValues.v_Guid;
         _MAMATHANG = EmptyValues.v_Int32;
         _SOLUONGSI = EmptyValues.v_decimal;
         _SOLUONGLE = EmptyValues.v_decimal;
         _DONGIASI = EmptyValues.v_decimal;
         _CHIETKHAUTHEOPHANTRAM = EmptyValues.v_double;
         _CHIETKHAUTHEOTIEN = EmptyValues.v_decimal;
         _ISCKPHANTRAM = EmptyValues.v_bool;
         _THANHTIENTRUOCCHIETKHAU_CT = EmptyValues.v_decimal;
         _THANHTIENSAUCHIETKHAU_CT = EmptyValues.v_decimal;
         _GHICHU = EmptyValues.v_string;
         _ISDELETE = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MACHITIETHOADON"] is DBNull))
		{
			obj.MACHITIETHOADON = (string)reader["MACHITIETHOADON"];
		}
                if(!(reader["MAHOADON"] is DBNull))
		{
			obj.MAHOADON = (string)reader["MAHOADON"];
		}
                if(!(reader["MAKHO"] is DBNull))
		{
			obj.MAKHO = (Guid)reader["MAKHO"];
		}
                if(!(reader["MAMATHANG"] is DBNull))
		{
			obj.MAMATHANG = (Int32)reader["MAMATHANG"];
		}
                if(!(reader["SOLUONGSI"] is DBNull))
		{
			obj.SOLUONGSI = (decimal)reader["SOLUONGSI"];
		}
                if(!(reader["SOLUONGLE"] is DBNull))
		{
			obj.SOLUONGLE = (decimal)reader["SOLUONGLE"];
		}
                if(!(reader["DONGIASI"] is DBNull))
		{
			obj.DONGIASI = (decimal)reader["DONGIASI"];
		}
                if(!(reader["CHIETKHAUTHEOPHANTRAM"] is DBNull))
		{
			obj.CHIETKHAUTHEOPHANTRAM = (double)reader["CHIETKHAUTHEOPHANTRAM"];
		}
                if(!(reader["CHIETKHAUTHEOTIEN"] is DBNull))
		{
			obj.CHIETKHAUTHEOTIEN = (decimal)reader["CHIETKHAUTHEOTIEN"];
		}
                if(!(reader["ISCKPHANTRAM"] is DBNull))
		{
			obj.ISCKPHANTRAM = (bool)reader["ISCKPHANTRAM"];
		}
                if(!(reader["THANHTIENTRUOCCHIETKHAU_CT"] is DBNull))
		{
			obj.THANHTIENTRUOCCHIETKHAU_CT = (decimal)reader["THANHTIENTRUOCCHIETKHAU_CT"];
		}
                if(!(reader["THANHTIENSAUCHIETKHAU_CT"] is DBNull))
		{
			obj.THANHTIENSAUCHIETKHAU_CT = (decimal)reader["THANHTIENSAUCHIETKHAU_CT"];
		}
                if(!(reader["GHICHU"] is DBNull))
		{
			obj.GHICHU = (string)reader["GHICHU"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
//            _MACHITIETHOADON = (reader["MACHITIETHOADON"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MACHITIETHOADON"];
//            _MAHOADON = (reader["MAHOADON"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADON"];
//            _MAKHO = (reader["MAKHO"] is DBNull)?DalTools.EmptyValues.v_Guid:(Guid)reader["MAKHO"];
//            _MAMATHANG = (reader["MAMATHANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAMATHANG"];
//            _SOLUONGSI = (reader["SOLUONGSI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGSI"];
//            _SOLUONGLE = (reader["SOLUONGLE"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGLE"];
//            _DONGIASI = (reader["DONGIASI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["DONGIASI"];
//            _CHIETKHAUTHEOPHANTRAM = (reader["CHIETKHAUTHEOPHANTRAM"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["CHIETKHAUTHEOPHANTRAM"];
//            _CHIETKHAUTHEOTIEN = (reader["CHIETKHAUTHEOTIEN"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["CHIETKHAUTHEOTIEN"];
//            _ISCKPHANTRAM = (reader["ISCKPHANTRAM"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISCKPHANTRAM"];
//            _THANHTIENTRUOCCHIETKHAU_CT = (reader["THANHTIENTRUOCCHIETKHAU_CT"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["THANHTIENTRUOCCHIETKHAU_CT"];
//            _THANHTIENSAUCHIETKHAU_CT = (reader["THANHTIENSAUCHIETKHAU_CT"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["THANHTIENSAUCHIETKHAU_CT"];
//            _GHICHU = (reader["GHICHU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GHICHU"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string MACHITIETHOADON, string MAHOADON, Guid MAKHO, Int32 MAMATHANG, decimal SOLUONGSI, decimal SOLUONGLE, decimal DONGIASI, double CHIETKHAUTHEOPHANTRAM, decimal CHIETKHAUTHEOTIEN, bool ISCKPHANTRAM, decimal THANHTIENTRUOCCHIETKHAU_CT, decimal THANHTIENSAUCHIETKHAU_CT, string GHICHU, bool ISDELETE)
        {
                     this._MACHITIETHOADON = MACHITIETHOADON;
         this._MAHOADON = MAHOADON;
         this._MAKHO = MAKHO;
         this._MAMATHANG = MAMATHANG;
         this._SOLUONGSI = SOLUONGSI;
         this._SOLUONGLE = SOLUONGLE;
         this._DONGIASI = DONGIASI;
         this._CHIETKHAUTHEOPHANTRAM = CHIETKHAUTHEOPHANTRAM;
         this._CHIETKHAUTHEOTIEN = CHIETKHAUTHEOTIEN;
         this._ISCKPHANTRAM = ISCKPHANTRAM;
         this._THANHTIENTRUOCCHIETKHAU_CT = THANHTIENTRUOCCHIETKHAU_CT;
         this._THANHTIENSAUCHIETKHAU_CT = THANHTIENSAUCHIETKHAU_CT;
         this._GHICHU = GHICHU;
         this._ISDELETE = ISDELETE;
        }
    }
}